import React from "react"
import { Button } from "esy-ui"
import { useTranslation } from "react-i18next"

const btns = ["mini", "small", "normal", "large"]
export const DemoR1 = () => {
    const { t } = useTranslation()

    const onClick = () => {
        // 点击事件
    }

    return (
        <div className="flex items-center gap-2">
            {btns.map((s) => (
                <Button key={s} type="primary" size={s} onClick={onClick}>
                    {t(s)}
                </Button>
            ))}
        </div>
    )
}

export const demoR1Json = () => `
import React from "react"
import { Button } from "esy-ui"
import { useTranslation } from "react-i18next"

const btns = ["mini", "small", "normal", "large"]
export const DemoR1 = () => {
    const { t } = useTranslation()

    const onClick = () => {
        // 点击事件
    }

    return (
        <div className="flex items-center gap-2">
            {btns.map((s) => (
                <Button key={s} type="primary" size={s} onClick={onClick}>
                    {t(s)}
                </Button>
            ))}
        </div>
    )
}
`
